Skip to content

Wi-Fi improvements#406

Merged
stintel merged 11 commits intomainfrom
feature/wifi_improvements
Mar 24, 2025
Merged

Wi-Fi improvements#406
stintel merged 11 commits intomainfrom
feature/wifi_improvements

Conversation

@stintel
Copy link
Copy Markdown
Collaborator

@stintel stintel commented Mar 24, 2025

The ESP-IDF Wi-Fi stack seems to be terrible at deciding which AP to
connect to. The Willow in my bedroom tends to connect to my outdoor AP
on boot, which has a signal strength of around -80 dBm, while there's an
AP where it has a signal strengh of around -66 dBm. Willow is
practically unusable when it's connected to the outdoor AP, due to the
low signal strength.

This PR adds various changes to improve this behaviour.

Individual commit messages contain more info.

Use a separate event handler for IP_EVENT and WIFI_EVENT. This is
slightly more efficient, as we don't need to check ev_base every time.
The compiler should be able to better optimize switch-case statements,
especially when there's multiple distinct cases. As we'll be adding more
event handling, it makes sense to use switch-case.
The ESP-IDF Wi-Fi stack seems to be terrible at deciding which AP to
connect to. The Willow in my bedroom tends to connect to my outdoor AP
on boot, which has a signal strength of around -80 dBm, while there's an
AP where it has a signal strengh of around -66 dBm. Willow is
practically unusable when it's connected to the outdoor AP, due to the
low signal strength.

Enabling 802.11v allows APs that support it to steer Willow to the
better AP. Enabling 802.11k should allow the Wi-Fi stack to make better
informed decision about which AP to connect to, or when and where to
roam.

This commit enables 802.11k and 802.11v in sdkconfig. Each of them will
be enabled in the driver in a separate follow-up commit, and a torture
test will be done for each of these commits, to test possible negative
impact.

Torture test results: 1000/1000.
With this change, it becomes possible to steer Willow to a different AP:

Tue Mar 11 11:17:59 2025 daemon.notice hostapd: wl24-iot: BSS-TM-RESP 60:55:f9:f8:36:04 status_code=0 bss_termination_delay=0 target_bssid=82:af:ca:5b:aa:54

Torture test results: 1000/1000.
With this change, Willow indicates it supports various RRM capabilities,
like Link Measurement, Beacon Passive Measurement, Beacon Active
Management.

Torture test results: 1000/1000.
This enables support for the Beacon Table Measurement Mode for Beacon
Measurement Request. This mode allows the Wi-Fi stack to respond with
data from the cache, rather than having to do additional measurements.

Torture test results: 1000/1000.
While the ESP32-S3 does not support multiple Wi-Fi bands, Multi Band
Operation aka Wi-Fi Agile Multiband introduces additional features to
further improve Radio Resource Management, on top of 802.11k and
802.11v.

Torture test results: 1000/1000.
Torture test results: 1000/1000.
@stintel stintel merged commit 4361c49 into main Mar 24, 2025
9 checks passed
@stintel stintel deleted the feature/wifi_improvements branch March 24, 2025 09:54
@stintel stintel added this to the 0.4.0 milestone Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant